package com.ruijing.haojie.common.config.network;

import java.util.List;

import com.ruijing.haojie.work.model.BannerBean;
import com.ruijing.haojie.work.model.CertStateBean;
import com.ruijing.haojie.work.model.DelaySwitchBean;
import com.ruijing.haojie.work.model.EduInfo;
import com.ruijing.haojie.work.model.GoodsDetailsBean;
import com.ruijing.haojie.work.model.HttpRespond;
import com.ruijing.haojie.work.model.ImageRespond;
import com.ruijing.haojie.work.model.LoginInfoBean;
import com.ruijing.haojie.work.model.NewsModel;
import com.ruijing.haojie.work.model.OrderConfirmBean;
import com.ruijing.haojie.work.model.PicCodeBean;
import com.ruijing.haojie.work.model.PopBean;
import com.ruijing.haojie.work.model.SingleAdsBean;
import com.ruijing.haojie.work.model.SinglePageBean;
import com.ruijing.haojie.work.model.TimeStampBean;
import com.ruijing.haojie.work.ui.user.model.AddressBean;
import com.ruijing.haojie.work.ui.user.model.BankCertSmsBean;
import com.ruijing.haojie.work.ui.user.model.CertBean;
import com.ruijing.haojie.work.ui.user.model.GoodsBean;
import com.ruijing.haojie.work.ui.user.model.HelpFeedBackBean;
import com.ruijing.haojie.work.ui.user.model.ProvinceBean;
import com.ruijing.haojie.work.ui.user.model.ServiceBean;
import com.ruijing.haojie.work.ui.user.model.ShareBean;
import com.ruijing.haojie.work.ui.user.model.UpdateBean;
import com.ruijing.haojie.work.ui.user.presenter.OfficialAccountInfo;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by xuyougen on 2018/4/11.
 */

public interface ApiService {

    @POST(ApiFactory.SIGN_OUT)
    Observable<HttpRespond> signOut(@Body RequestBody requestBody);

    //    ?type=1&page=1
    @GET("satinApi")
    Observable<String> getContent(@Query("type") int type, @Query("page") int page);


    //------------------------------------------------------------------------
    //图形验证码
    @POST("center/login/Captcha")
    Observable<HttpRespond<PicCodeBean>> getPicCode(@Body RequestBody body);

    //短信验证码
    @POST("core/tool/getcode")
    Observable<HttpRespond> getSmsCode(@Body RequestBody body);

    //注册
    @POST("center/login/reg")
    Observable<HttpRespond> register(@Body RequestBody requestBody);

    //获取时间戳
    @POST("core/tool/timestamp")
    Observable<HttpRespond<TimeStampBean>> getTimeStamp(@Body RequestBody requestBody);

    //登录
    @POST("center/login/login")
    Observable<HttpRespond<LoginInfoBean>> login(@Body RequestBody requestBody);

    //登出
    @POST("center/login/layout")
    Observable<HttpRespond> logOut(@Body RequestBody requestBody);

    //重置密码
    @POST("center/login/forget")
    Observable<HttpRespond> resetPwd(@Body RequestBody requestBody);

    //获取优惠券列表
    @POST("center/member/coupanlist")
    Observable<HttpRespond<String>> getCouponList(@Body RequestBody requestBody);

    //获取提额券列表
    @POST("center/member/coupanlist2")
    Observable<HttpRespond<String>> getTieList(@Body RequestBody requestBody);

    //获取优惠券个数
    @POST("center/member/coupancounts")
    Observable<HttpRespond<String>> getCouponNumber(@Body RequestBody requestBody);

    //获取提额劵个数
    @POST("center/member/coupancounts2")
    Observable<HttpRespond<String>> getTieNumber(@Body RequestBody requestBody);

    //删除优惠券
    @POST("center/member/deltcoupan")
    Observable<HttpRespond> deleteCoupon(@Body RequestBody requestBody);

    //删除提额劵
    @POST("center/member/deltcoupan2")
    Observable<HttpRespond> deleteTie(@Body RequestBody requestBody);

    //获取单个广告位【用于一张】
    @POST("Home/home/SingleAds")
    Observable<HttpRespond<SingleAdsBean>> getSingleAds(@Body RequestBody requestBody);

    //获取广告轮播图【用于多张】
    @POST("Home/home/ListAds")
    Observable<HttpRespond<List<BannerBean>>> getBannerList(@Body RequestBody requestBody);

    //获取商品列表
    @POST("Home/Items/itemlist")
    Observable<HttpRespond<List<GoodsBean>>> getGoodsList(@Body RequestBody requestBody);

    //获取商品详情
    @POST("Home/Items/gooddetails")
    Observable<HttpRespond<GoodsDetailsBean>> getGoodsDetails(@Body RequestBody requestBody);

    //获取单页内容
    @POST("News/index/single")
    Observable<HttpRespond<SinglePageBean>> getSinglePage(@Body RequestBody requestBody);

    //获取地址列表
    @POST("center/member/addresslist")
    Observable<HttpRespond<List<AddressBean>>> getAddressList(@Body RequestBody requestBody);

    //设置默认地址
    @POST("center/member/setaddress")
    Observable<HttpRespond> setDefaultAddress(@Body RequestBody requestBody);

    //删除地址
    @POST("center/member/deltaddress")
    Observable<HttpRespond> deleteAddress(@Body RequestBody requestBody);

    //获取省市区
    @POST("Home/home/areas")
    Observable<HttpRespond<List<ProvinceBean>>> getPcdInfo(@Body RequestBody requestBody);

    @POST("center/member/editaddress")
    Observable<HttpRespond> saveAddress(@Body RequestBody requestBody);

    //是否显示延时支付按钮开关
    @POST("Home/Items/isyanshi")
    Observable<HttpRespond<DelaySwitchBean>> isYanShi(@Body RequestBody requestBody);

    //查看会员所有认证的状态
    @POST("center/Renzen/rzstates")
    Observable<HttpRespond<CertStateBean>> getCertState(@Body RequestBody requestBody);

    //立即购买校验(商品详情页-延时支付开启)
    @POST("center/Order/fastbuycheck")
    Observable<HttpRespond<String>> fastBuyCheck(@Body RequestBody requestBody);

    //获取所有认证信息列表
    @POST("center/Renzen/getlists")
    Observable<HttpRespond<List<CertBean>>> getCertList(@Body RequestBody requestBody);

    //获取凭证URL
    @POST("center/Renzen/get_url_youping")
    Observable<String> getVoucherUrl(@Body RequestBody requestBody);

    //获取分享链接
    @POST("center/member/share")
    Observable<HttpRespond<ShareBean>> getShareContent(@Body RequestBody requestBody);

    //获取客服信息
    @POST("center/member/getlianxi")
    Observable<HttpRespond<ServiceBean>> getServiceData(@Body RequestBody requestBody);

    //帮助反馈列表
    @POST("News/index/guidelist")
    Observable<HttpRespond<List<HelpFeedBackBean>>> getHelpFeedBackList(@Body RequestBody requestBody);

    @POST("News/index/guidedetails")
    Observable<HttpRespond<SinglePageBean>> getFeedBackInfo(@Body RequestBody body);

    @POST("Center/Message/create")
    Observable<HttpRespond> feedBack(@Body RequestBody requestBody);

    //是否有未读消息
    @POST("Center/Message/isnoread")
    Observable<HttpRespond<String>> isNoRead(@Body RequestBody requestBody);

    //首页显示状态判断(会员登录后)
    @POST("center/member/homepages")
    Observable<String> homepages(@Body RequestBody requestBody);

    //获取借款金额与借款期限(我要借贷)
    @POST("center/Order/getjkparater")
    Observable<String> getJieKuanCanShu(@Body RequestBody requestBody);

    //获取借款金额与借款期限(我要借贷)
    @POST("center/Order/gethkmoney")
    Observable<String> getHuanKuanMoney(@Body RequestBody requestBody);

    //提交订单操作(我要借贷)
    @POST("center/Order/downorder")
    Observable<String> woYaoJieQian(@Body RequestBody requestBody);

    //获取新闻列表
    @POST("News/index/guidelist")
    Observable<HttpRespond<List<NewsModel>>> getNewsList(@Body RequestBody requestBody);

    //获取新闻详情
    @POST("News/index/guidedetails")
    Observable<HttpRespond<NewsModel>> getNewsDetails(@Body RequestBody requestBody);

    //获取最大可借金额(会员登录后)
    @POST("center/member/getedu")
    Observable<String> getedu(@Body RequestBody requestBody);

    //获取最大可借金额(会员未登录时)
    @POST("Home/home/getedunolog")
    Observable<String> getedunolog(@Body RequestBody requestBody);

    //保存短信
    @POST("Center/Renzen/duanxinsave")
    Observable<String> saveNotes(@Body RequestBody body);

    //获取最大可借金额(会员未登录时)
    @POST("center/Order/orderlist")
    Observable<String> getLoanOrderList(@Body RequestBody requestBody);

    //获取用户消息列表
    @POST("Center/Message/index")
    Observable<HttpRespond<String>> getMessageList(@Body RequestBody requestBody);

    //获取用户消息详情
    @POST("Center/Message/msgdetail")
    Observable<HttpRespond<String>> getMessageDetails(@Body RequestBody requestBody);

    //上传图片
    @Multipart
    @POST("Upload/Upload/index")
    Observable<ImageRespond> uploadImage(@Part("token") RequestBody token, @Part("client") RequestBody client, @Part MultipartBody.Part image_part);

    //获取用户基本信息
    @POST("center/member/info")
    Observable<String> getUserInfo(@Body RequestBody requestBody);

    //会员状态详情(会员中心首页头部)
    @POST("center/member/getmeminfo")
    Observable<String> getHeadInfo(@Body RequestBody requestBody);

    //保存头像路径(调用前，请先调用图片上传接口)
    @POST("center/member/updhead")
    Observable<HttpRespond> updateHeadImg(@Body RequestBody requestBody);

    //提交身份证认证
    @POST("center/Renzen/cardsrz")
    Observable<String> idCartCert(@Body RequestBody body);

    //获取会员属性参数
    @GET("center/Renzen/itemlist")
    Observable<String> getTermInfo(@Query("client") String client,
                                   @Query("package") String packageName,
                                   @Query("version") String ver,
                                   @Query("propertyid") int id);

    @POST("Home/home/version")
    Observable<HttpRespond<UpdateBean>> checkUpdate(@Body RequestBody body);

    //基本信息验证提交
    @POST("center/Renzen/memberinforz")
    Observable<String> memberInfoCert(@Body RequestBody body);

    //保存社交信息
    @POST("center/Renzen/socialgx")
    Observable<String> saveSocialInfo(@Body RequestBody body);

    //保存社交信息(联系人)
    @POST("center/Renzen/socialtx")
    Observable<String> saveSocialCert(@Body RequestBody body);

    //获取默认收货地址
    @POST("center/member/checkaddress")
    Observable<HttpRespond<AddressBean>> getDefaultAddress(@Body RequestBody requestBody);

    //支付宝认证
    @POST("center/Renzen/alipayrz")
    Observable<String> postAliPay(@Body RequestBody body);

    //淘宝认证
    @POST("center/Renzen/taobaorz")
    Observable<String> postTaoBao(@Body RequestBody body);

    //手机认证new
    @POST("center/Renzen/mobole_taskid_save")
    Observable<String> postMobole(@Body RequestBody body);

    //获取手机认证URL
    @POST("center/Renzen/mobilezr")
    Observable<String> getMobileUrl(@Body RequestBody body);

    //获取默认收货地址
    @POST("center/Order/sureorders")
    Observable<HttpRespond<OrderConfirmBean>> getOrderConfirmInfo(@Body RequestBody requestBody);

    //修改密码
    @POST("center/member/password")
    Observable<HttpRespond> changePwd(@Body RequestBody requestBody);

    //使用提额劵提升额度
    @POST("center/member/usecoupan2")
    Observable<HttpRespond> useTie(@Body RequestBody requestBody);

    //提交订单操作(确认订单页面)
    @POST("center/Order/downorder")
    Observable<String> commitOrder(@Body RequestBody requestBody);

    //订单列表
    @POST("center/Order/orderlist")
    Observable<HttpRespond<String>> getOrderList(@Body RequestBody requestBody);

    //取消订单
    @POST("center/Order/cancelorder")
    Observable<HttpRespond> cancelOrder(@Body RequestBody requestBody);

    //确认收货
    @POST("center/Order/confirmorder")
    Observable<HttpRespond> confirmReceiveGoods(@Body RequestBody requestBody);

    //获取订单详情
    @POST("center/Order/orderdetails")
    Observable<HttpRespond<String>> getOrderDetails(@Body RequestBody requestBody);

    //获取订单详情
    @POST("center/Order/orderdetails")
    Observable<String> getLoanOrderDetails(@Body RequestBody requestBody);

    //卖了换钱确认页(订单列表中点击卖了换钱跳转的页面)
    @POST("center/Order/sellgoods")
    Observable<HttpRespond<String>> getConfirmSaleGoodsInfo(@Body RequestBody requestBody);

    //转卖协议(转卖前，需传递收购公司companid)
    @POST("center/Order/hetong")
    Observable<HttpRespond<String>> getSaleContract(@Body RequestBody requestBody);

    //转卖协议(转卖前，需传递收购公司companid)
    @POST("center/Order/hetong")
    Observable<String> chanKanHeTong(@Body RequestBody requestBody);

    //获取订单简单信息(我要还款页面)
    @POST("center/Order/hhdetails")
    Observable<String> getLoanSimpleInfo(@Body RequestBody requestBody);

    //获取续借信息(续借选择页-我要续借页面)
    @POST("center/Order/xjdetails")
    Observable<String> xuJieXinXin(@Body RequestBody requestBody);

    //查看合同(也就是转卖协议，确定转卖之后的订单调用，无需传收购公司id)
    @POST("center/Order/hetong2")
    Observable<HttpRespond<String>> browseSaleContract(@Body RequestBody requestBody);

    //转卖协议(转卖前，需传递收购公司companid)
    @POST("center/Order/sellaction")
    Observable<HttpRespond> confirmSale(@Body RequestBody requestBody);

    //还款支付方式
    @POST("center/Order/hkpaystype")
    Observable<HttpRespond<String>> getPaymentStyle(@Body RequestBody requestBody);

    //获取官方账号(还款支付时用)
    @POST("center/member/gfaccount")
    Observable<HttpRespond<OfficialAccountInfo>> getOfficialAccountInfo(@Body RequestBody requestBody);

    //还款支付操作
    @POST("center/Order/hkpay")
    Observable<String> commitRepayment(@Body RequestBody requestBody);

    @POST("center/rongbao/index")
    Observable<String> getRBPayBankList(@Body RequestBody requestBody);

    @POST("center/rongbao2/index")
    Observable<String> getRBPayBankList2(@Body RequestBody requestBody);

    @POST("center/rongbao/banksave")
    Observable<String> sendBankCode(@Body RequestBody requestBody);

    @POST("center/rongbao2/banksave")
    Observable<String> sendBankCode2(@Body RequestBody requestBody);

    @POST("center/rongbao/sendmsg")
    Observable<String> sendPayCode(@Body RequestBody requestBody);

    @POST("center/rongbao2/sendmsg")
    Observable<String> sendPayCode2(@Body RequestBody requestBody);

    @POST("center/rongbao/verifymsg")
    Observable<String> bankSave(@Body RequestBody requestBody);

    @POST("center/rongbao2/verifymsg")
    Observable<String> bankSave2(@Body RequestBody requestBody);

    @POST("center/rongbao/verifypaymsg")
    Observable<String> payByRB(@Body RequestBody requestBody);

    @POST("center/rongbao2/verifypaymsg")
    Observable<String> payByRB2(@Body RequestBody requestBody);

    @POST("center/rongbao/payment")
    Observable<String> RBpreparePay(@Body RequestBody requestBody);

    @POST("center/rongbao2/payment")
    Observable<String> RBpreparePay2(@Body RequestBody requestBody);

    //获取首页弹窗
    @POST("center/member/gettancinfo")
    Observable<HttpRespond<PopBean>> getPopInfo(@Body RequestBody requestBody);

    //获取默认额度(会员未登录时)
    @POST("Home/home/getedunolog")
    Observable<HttpRespond<EduInfo>> getEduInfo(@Body RequestBody requestBody);

    //银行卡认证(获取手机验证码)
    @POST("center/Renzen/bankrz1")
    Observable<HttpRespond<BankCertSmsBean>> getBankCertSmsCode(@Body RequestBody requestBody);

    //银行卡认证(预签约短信验证,提交保存操作)
    @POST("center/Renzen/bankrz2")
    Observable<HttpRespond> commitBankCardCert(@Body RequestBody requestBody);

    //银行卡认证(预签约短信验证,提交保存操作)
    @POST("center/Renzen/bankrz3")

    Observable<HttpRespond> commitBankCardCert3(@Body RequestBody requestBody);

    //银行卡认证(预签约短信验证,提交保存操作)，只提交手机号和银行卡号
    @POST("center/Renzen/bankrz4")
    Observable<HttpRespond> commitBankCardCert4(@Body RequestBody requestBody);

    //银行卡认证，验证验证码是否正确
    @POST("center/Renzen/bankrz5")
    Observable<HttpRespond> commitBankCardCert5(@Body RequestBody requestBody);

    //银行卡认证获取姓名和身份证号
    @POST("center/Renzen/get_name_card")
    Observable<String> getNameInfo(@Body RequestBody requestBody);

    //获取续借信息(续借选择页)
    @POST("center/Order/xjdetails")
    Observable<String> getXjDetails(@Body RequestBody requestBody);

    //获取续借支付总金额
    @POST("center/Order/getxjfee")
    Observable<String> getXjFee(@Body RequestBody requestBody);

    //续借支付确认操作(选择支付方式页面)
    @POST("center/Order/xjpay")
    Observable<String> commitXjRepayment(@Body RequestBody requestBody);

    //手机认证(手机认证成功之后调)
    @POST("center/Renzen/mobilezr2")
    Observable<String> mobilezr2(@Body RequestBody requestBody);

    //给服务器传用户ID
    @POST("Center/Notify/getid")
    Observable<String> putId(@Body RequestBody body);
}
